﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using System.Web.Mvc;

namespace FCMS.Mvc
{
    public class AdminViewEngine : RazorViewEngine
    {
        public AdminViewEngine()
        {
            MasterLocationFormats = new[]{
                "~/admin/views/{1}/{0}.cshtml",
                "~/admin/views/shared/{{0}}.cshtml"
            };

            ViewLocationFormats = new[]{
                "~/admin/views/{1}/{0}.cshtml",
                "~/admin/views/{1}/{0}.cshtml",
                "~/admin/views/shared/{0}.cshtml",
                "~/admin/views/shared/{0}.cshtml"
            };
            PartialViewLocationFormats = ViewLocationFormats;
        }

        protected override IView CreatePartialView(ControllerContext controllerContext, string partialPath)
        {
            return base.CreatePartialView(controllerContext, partialPath);
        }

        protected override IView CreateView(ControllerContext controllerContext, string viewPath, string masterPath)
        {
            return base.CreateView(controllerContext, viewPath, masterPath);
        }
    }
}
